<?php
/**
 * type.php
 * @author ranuandra
 *
 * 10 Agu 2011 14:32:27
 *
 * 
 */

class Model_Type extends ORM
{
				protected $_has_many = array(
									'polreg' 	=> array('model' => 'polreg'),
								);
				
				protected $_belongs_to = array(
									'merk'		=> array('model' 	=> 'merk'),
									'model'		=> array('model'	=> 'model')
								);
								
				public function cek_data($type)
				{
					return DB::select('id')
						->from($this->_table_name)
						->where('type', '=', $type)
						->execute($this->_db);				
				}
}